package com.zbs.framework.common.converter;

import com.zbs.framework.common.utils.LocalDateUtil;
import org.springframework.core.convert.converter.Converter;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class LocalDateTimeConverter implements Converter<String, LocalDateTime> {
    @Override
    public LocalDateTime convert(@NonNull String date) {
        return LocalDateUtil.strToLocalDateTime(date);
    }
}